package server.content.quests;

import server.content.quests.misc.SimpleQuest;
import server.content.skills.misc.SkillConstants;
import server.game.players.Client;

/**
 * 
 * @author Miracle
 * 
 */
public class CooksAss extends SimpleQuest {

	public CooksAss(Client c, int questId) {
		super(c, questId);
		setStage(getStage());
	}

	@Override
	public void showInformation() {
		clearInterface();
		setInterfaceTitle("Cooks Assistant");
		switch (getStage()) {
		case 0: // Before you start
			getClient().getPA().sendFrame126(
					"To start the quest, you should talk with Cook", 8147);
			getClient().getPA()
					.sendFrame126("found in Lumbridge Castle.", 8148);
			break;
		case 1: // bring the egg, pot of flour, bucket of milk
			getClient().getPA().sendFrame126(
					"@str@To start the quest, you should talk with Cook", 8147);
			getClient().getPA().sendFrame126("@str@found in Lumbridge Castle.",
					8148);
			getClient().getPA().sendFrame126("", 8149);
			getClient().getPA().sendFrame126(
					"The cook has asked you to get the following items:", 8150);
			getClient().getPA().sendFrame126("A bucket of milk", 8151);
			getClient().getPA().sendFrame126("A pot of flour", 8152);
			getClient().getPA().sendFrame126("An egg", 8153);
			break;
		case 2: // quest has been complete
			getClient().getPA().sendFrame126(
					"@str@To start the quest, you should talk with Cook", 8147);
			getClient().getPA().sendFrame126("@str@found in Lumbridge Castle.",
					8148);
			getClient().getPA().sendFrame126("", 8149);
			getClient().getPA().sendFrame126(
					"@str@Cook have asked you to get the following items:",
					8150);
			getClient().getPA().sendFrame126("@str@A bucket of milk", 8151);
			getClient().getPA().sendFrame126("@str@A pot of flour", 8152);
			getClient().getPA().sendFrame126("@str@An egg", 8153);
			getClient().getPA().sendFrame126("", 8154);
			getClient().getPA().sendFrame126("You have completed this quest!",
					8155);
			getClient().getPA().sendFrame126(
					"You receive 250 Cooking XP, and 2 QP.", 8156);
			setStage(3);
			finishQuest();
			break;
		case 3:
			getClient().getPA().sendFrame126(
					"@str@To start the quest, you should talk with Cook", 8147);
			getClient().getPA().sendFrame126("@str@found in Lumbridge Castle.",
					8148);
			getClient().getPA().sendFrame126("", 8149);
			getClient().getPA().sendFrame126(
					"@str@Cook have asked you to get the following items:",
					8150);
			getClient().getPA().sendFrame126("@str@A bucket of milk", 8151);
			getClient().getPA().sendFrame126("@str@A pot of flour", 8152);
			getClient().getPA().sendFrame126("@str@An egg", 8153);
			getClient().getPA().sendFrame126("", 8154);
			getClient().getPA().sendFrame126("You have completed this quest!",
					8155);
			getClient().getPA().sendFrame126(
					"You receive 250 Cooking XP, and 2 QP.", 8156);
			break;
		}
		showInterface();
	}

	@Override
	public void finishQuest() {
		getClient().sendMessage("You receive 250 Cooking XP, and 2 QP.");
		getClient().getPA().addSkillXP(250, SkillConstants.COOKING);
	}

}
